﻿@using Orchard.Core.Contents
@using Orchard.MediaLibrary.Fields
@using Orchard.Utility.Extensions;

@{
    var field       = (MediaLibraryPickerField) Model.ContentField;
    string name     = field.DisplayName;
    var mediaParts  = field.MediaParts;
}
<span class="name">@name:</span>
<div class="media-library-picker-field media-library-picker-field-@name.HtmlClassify()">
    
    @if (mediaParts.Any()) {
        foreach (var contentItem in mediaParts) {
            <span>
                @Display(BuildDisplay(contentItem, "Thumbnail"))
            </span>
        }
    }
</div>
